<?php
$displayError = isset($_SESSION['errorMessage']) ? "block" : "none";
$displayInfo = isset($_SESSION['infoMessage']) ? "block" : "none";
?>
<noscript>
<div class="message-info" style="display: <?php echo $displayInfo; ?>">
    <div class="message-icon" ><img alt="Information Message" src="<?php echo Utils::getUrl('content/images/info.png') ?>" /></div>
    <div class="message-message" ><?php if (isset($_SESSION['infoMessage']))
    echo $_SESSION['infoMessage']; ?></div>
</div>

<div class="message-error" style="display: <?php echo $displayError; ?>">
    <div class="message-icon" ><img alt="Warning Message" src="<?php echo Utils::getUrl('content/images/warning.png') ?>" /></div>
    <div class="message-message" ><?php if (isset($_SESSION['errorMessage']))
    echo $_SESSION['errorMessage']; ?></div>
</div>
</noscript>
<div id="message-java">
    <div class="message-info">
        <div class="message-icon" ><img alt="Information Message" src="<?php echo Utils::getUrl('content/images/info.png') ?>" /></div>
        <div class="message-message" ></div>
        <div class="message-close"><img alt="Close Message" src="<?php echo Utils::getUrl('content/images/close.gif') ?>" /></div>
    </div>

    <div class="message-error">
        <div class="message-icon" ><img alt="Warning Message" src="<?php echo Utils::getUrl('content/images/warning.png') ?>" /></div>
        <div class="message-message" ></div>
        <div class="message-close"><img alt="Close Message" src="<?php echo Utils::getUrl('content/images/close.gif') ?>" /></div>
    </div>
</div>
<script type="text/javascript">
    $(window).load(function(){
<?php
if (isset($_SESSION['errorMessage'])) {
    ?>
            showError('<?php echo $_SESSION['errorMessage'] ?>');
        
    <?php
}
if (isset($_SESSION['infoMessage'])) {
    ?>
            showInfo('<?php echo $_SESSION['infoMessage'] ?>');
    <?php
}
?>
    });
</script>

<?php
unset($_SESSION['infoMessage']);
unset($_SESSION['errorMessage']);
?>